import axios from '~/plugins/axios';

//发布升级公告
export const addPublishAdv = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/b2c/announcement/system/upgrade/publish',preload||{})
     .catch(function (error) {	
    });
};

//删除升级公告
export const delPublishAdv = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/b2c/announcement/system/upgrade/delete',preload||{})
       .catch(function (error) {	
    });
};

//更新升级公告
export const updatePublishAdv = function({commit, state}, preload) {
    return axios.post(process.env.baseUrl + '/b2c/announcement/system/upgrade/update',preload||{})
        .catch(function (error) {	
    });
};

//查看指定的系统升级公告
export const detailPublishAdv = function({commit, state}, preload) {
    return axios.get(process.env.baseUrl + '/b2c/announcement/system/upgrade/get', {
        params: preload || {}
    })
};

//查询系统升级公告列表
export const getPublishAdvList = function({commit, state}, preload) {
    return axios.get(process.env.baseUrl + '/b2c/announcement/system/upgrade/list', {
        params: preload || {}
    })
};